package com.edu.base.ums.memberShareReward.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.edu.base.ums.memberShareReward.mapper.ClsMemberShareRewardMapper;
import com.edu.base.ums.memberShareReward.domain.ClsMemberShareReward;
import com.edu.base.ums.memberShareReward.service.IClsMemberShareRewardService;

/**
 * 会员分享奖励积分记录Service业务层处理
 * 
 * @author zw
 * @date 2022-06-28
 */
@Service
public class ClsMemberShareRewardServiceImpl implements IClsMemberShareRewardService 
{
    @Autowired
    private ClsMemberShareRewardMapper clsMemberShareRewardMapper;

    /**
     * 查询会员分享奖励积分记录
     * 
     * @param id 会员分享奖励积分记录ID
     * @return 会员分享奖励积分记录
     */
    @Override
    public ClsMemberShareReward selectClsMemberShareRewardById(Long id)
    {
        return clsMemberShareRewardMapper.selectClsMemberShareRewardById(id);
    }

    /**
     * 查询会员分享奖励积分记录列表
     * 
     * @param clsMemberShareReward 会员分享奖励积分记录
     * @return 会员分享奖励积分记录
     */
    @Override
    public List<ClsMemberShareReward> selectClsMemberShareRewardList(ClsMemberShareReward clsMemberShareReward)
    {
        return clsMemberShareRewardMapper.selectClsMemberShareRewardList(clsMemberShareReward);
    }

    /**
     * 新增会员分享奖励积分记录
     * 
     * @param clsMemberShareReward 会员分享奖励积分记录
     * @return 结果
     */
    @Override
    public int insertClsMemberShareReward(ClsMemberShareReward clsMemberShareReward)
    {
        clsMemberShareReward.setCreateTime(DateUtils.getNowDate());
        return clsMemberShareRewardMapper.insertClsMemberShareReward(clsMemberShareReward);
    }

    /**
     * 修改会员分享奖励积分记录
     * 
     * @param clsMemberShareReward 会员分享奖励积分记录
     * @return 结果
     */
    @Override
    public int updateClsMemberShareReward(ClsMemberShareReward clsMemberShareReward)
    {
        return clsMemberShareRewardMapper.updateClsMemberShareReward(clsMemberShareReward);
    }

    /**
     * 批量删除会员分享奖励积分记录
     * 
     * @param ids 需要删除的会员分享奖励积分记录ID
     * @return 结果
     */
    @Override
    public int deleteClsMemberShareRewardByIds(Long[] ids)
    {
        return clsMemberShareRewardMapper.deleteClsMemberShareRewardByIds(ids);
    }

    /**
     * 删除会员分享奖励积分记录信息
     * 
     * @param id 会员分享奖励积分记录ID
     * @return 结果
     */
    @Override
    public int deleteClsMemberShareRewardById(Long id)
    {
        return clsMemberShareRewardMapper.deleteClsMemberShareRewardById(id);
    }
}
